package com.shaunstone.gae_web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import java.security.Principal;

@Controller
public class TestController {

	@RequestMapping("/hello")
	public ModelAndView test() {
		String message = "Welcome to Spring 4.0 !";
		return new ModelAndView("hello", "message", message);
	}

	@RequestMapping("/profile/hello")
	public ModelAndView another(java.security.Principal principal) {
		String message = "Welcome to Spring 4.0 !" + principal.getName();
		return new ModelAndView("hello", "message", message);
	}

}
